﻿using System;
using System.Collections.Generic;

namespace IllicitOnion.LinqDimensions
{
	// ReSharper disable InconsistentNaming
	public static class IEnumerableExtensions
	{
		public static IEnumerable<T0, T1> And<T0, T1>(this IEnumerable<T0> t0s, IEnumerable<T1> t1s)
		{
			return new CompoundEnumerable<T0, T1>(t0s, t1s);
		}

		public static void ForEach<T>(this IEnumerable<T> elements, Action<T> action)
		{
			foreach (var element in elements)
			{
				action(element);
			}
		}

		public static IEnumerable<T0, T1> CartesianProduct<T0, T1>(this IEnumerable<T0> t0s, IEnumerable<T1> t1s)
		{
			return new CartesianProductEnumerable<T0, T1>(t0s, t1s);
		}
	}
	// ReSharper restore InconsistentNaming
}